package factoryNCastle;

import java.lang.reflect.Array;

import java.util.ArrayList;

import constants.*;

import objects.SpetialFeature;


public final class SpetialFeatureFactory {

	private static SpetialFeatureFactory instance = new SpetialFeatureFactory();
	
	public static ArrayList<SpetialFeature> listSpetialFeatures;
	
	private SpetialFeatureFactory(){
		
		listSpetialFeatures=new ArrayList<SpetialFeature>();
		listSpetialFeatures.add(getSpetialFeature(Constants.SPETIAL_FEATURE_LIFE));
		listSpetialFeatures.add(getSpetialFeature(Constants.SPETIAL_FEATURE_CURRENT_LIFE));
		listSpetialFeatures.add(getSpetialFeature(Constants.SPETIAL_FEATURE_SPEED));
		listSpetialFeatures.add(getSpetialFeature(Constants.SPETIAL_FEATURE_VISION_RANGE));
		listSpetialFeatures.add(getSpetialFeature(Constants.SPETIAL_FEATURE_X_TO_MOVE));
		listSpetialFeatures.add(getSpetialFeature(Constants.SPETIAL_FEATURE_Y_TO_MOVE));
		listSpetialFeatures.add(getSpetialFeature(Constants.SPETIAL_FEATURE_IS_MOVING));
		listSpetialFeatures.add(getSpetialFeature(Constants.SPETIAL_FEATURE_DAMAGE));
		listSpetialFeatures.add(getSpetialFeature(Constants.SPETIAL_FEATURE_ATTACK_TIME));
		
		
		
	}
	
	public static SpetialFeature getSpetialFeature(int spetialFeatureReference){
		
		switch(spetialFeatureReference){
		case Constants.SPETIAL_FEATURE_LIFE:
			return new SpetialFeature(Constants.SPETIAL_FEATURE_LIFE,"Vida",100);
			
		case Constants.SPETIAL_FEATURE_SPEED:
			return new SpetialFeature(Constants.SPETIAL_FEATURE_SPEED,"Velocidad",0.06);
			
		case Constants.SPETIAL_FEATURE_VISION_RANGE:
			return new SpetialFeature(Constants.SPETIAL_FEATURE_VISION_RANGE,"Rango de Vision",1200);
			
		case Constants.SPETIAL_FEATURE_X_TO_MOVE:
			return new SpetialFeature(Constants.SPETIAL_FEATURE_X_TO_MOVE,"X To Move",0);
			
		case Constants.SPETIAL_FEATURE_Y_TO_MOVE:
			return new SpetialFeature(Constants.SPETIAL_FEATURE_Y_TO_MOVE,"Y To Move",0);
			
		case Constants.SPETIAL_FEATURE_IS_MOVING:
			return new SpetialFeature(Constants.SPETIAL_FEATURE_IS_MOVING,"Status Movimiento",Constants.FALSE);  //>0 true   <0 false
			
		case Constants.SPETIAL_FEATURE_DAMAGE:
			return new SpetialFeature(Constants.SPETIAL_FEATURE_DAMAGE,"Danio",10); 
		case Constants.SPETIAL_FEATURE_CURRENT_LIFE:
			return new SpetialFeature(Constants.SPETIAL_FEATURE_CURRENT_LIFE,"Vida Actual",100);

		case Constants.SPETIAL_FEATURE_ATTACK_TIME:
			return new SpetialFeature(Constants.SPETIAL_FEATURE_ATTACK_TIME,"Tiempo de Ataque",1000);//time in seconds
			
		case Constants.SPETIAL_FEATURE_MONEY:
			return new SpetialFeature(Constants.SPETIAL_FEATURE_MONEY,"DINERO",0);
			
		case Constants.SPETIAL_FEATURE_TIME_TO_INCREASE_MONEY:
			return new SpetialFeature(Constants.SPETIAL_FEATURE_TIME_TO_INCREASE_MONEY,"TIME TO INCREASE",1000);
			
		case Constants.SPETIAL_FEATURE_MONEY_TO_INCREASE:
			return new SpetialFeature(Constants.SPETIAL_FEATURE_MONEY_TO_INCREASE,"DINERO A INCREMENTAR",10);
			
		}
		
		
		return null;
	}

}
